home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / system / pc_dcl.zip / HELP / LEXICALS.HTX < prev    next >
Text File  |  1992-01-08  |  45KB  |  1,488 lines

  1. Lexicals
  2.  
  3.  Lexicals
  4.  
  5.  
  6.    A set of functions that return information  about  character  strings
  7.    and attributes of the current process.
  8.  
  9.  
  10.   Additional information available:
  11.  
  12.   F$CVTIME F$CVTIME   F$DIRECTORY F$DIRECTORY    F$EDIT F$EDIT     F$ELEMENT F$ELEMENT  F$ENVIRONMENT F$ENVIRONMENT  
  13.   F$EXTRACT F$EXTRACT  F$FILE_ATTRIBUTES F$FILE_ATTRIBUTES         F$GETDVI F$GETDVI   F$GETSYI F$GETSYI   F$LENGTH F$LENGTH   
  14.   F$LOCATE F$LOCATE   F$MESSAGE F$MESSAGE      F$SEARCH F$SEARCH   F$MODE F$MODE     F$TIME F$TIME     F$TRNLNM F$TRNLNM  
  15.   F$TYPE F$TYPE     F$USER F$USER         F$VERIFY F$VERIFY 
  16.    
  17.  
  18. 
  19. F$CVTIME
  20.  
  21.   F$CVTIME
  22.  
  23.  
  24.      Converts an absolute or a combination time string to a string of  the
  25.      form "yyyy-mm-dd hh:mm:ss.cc".  The F$CVTIME function can also return
  26.      information about an absolute, combination, or delta time string.
  27.  
  28.      Format:
  29.  
  30.           F$CVTIME([input_time] [,output_time] [,field])
  31.  
  32.  
  33.   Additional information available:
  34.  
  35.     Return_Value F$CVTIME.Return_Value   Input_time F$CVTIME.Return_Value     Output_time F$CVTIME.Output_time    Field F$CVTIME.Field 
  36.     Examples F$CVTIME.Examples 
  37.  
  38. F$CVTIME.Return_Value
  39.  
  40.  F$CVTIME
  41.  
  42.     Return_Value
  43.  
  44.        A character string containing the requested information.
  45.  
  46.  
  47.  
  48.  F$CVTIME
  49.  
  50.     input_time
  51.  
  52.        The time string for which  information  is  requested.   Specify  the
  53.        input  time string as a character string expression.  You can specify
  54.        the input time string as an absolute, combination or delta time.   If
  55.        you  omit  the  time  argument  or  if you specify the time as a null
  56.        string, the current date and time, in absolute time format, is used.
  57.  
  58. F$CVTIME.Output_time
  59.  
  60.  F$CVTIME
  61.  
  62.     output_time
  63.  
  64.        The time format for the information you want returned.   Specify  the
  65.        output item argument as a character string expression that equates to
  66.        one of the following strings:   ABSOLUTE  The  requested  information
  67.        should be returned in absolute time format "dd-mmm-yyyy hh:mm:ss.cc".
  68.        COMPARISON The requested information should be returned in  the  form
  69.        "yyyy-mm-dd  hh:mm:ss.cc".
  70.  
  71.        ABSOLUTE     The requested information should be returned in absolute
  72.                     time format.
  73.  
  74.        COMPARISON   The requested information should be returned in the form
  75.                     "yyyy-mm-dd hh:mm:ss.cc".
  76.  
  77.        If you omit the output time argument, the default is COMPARISON.
  78.  
  79. F$CVTIME.Field
  80.  
  81.  F$CVTIME
  82.  
  83.     field
  84.  
  85.        The type of information to be returned.  The information is  returned
  86.        in the time format specified by the output time argument.
  87.  
  88.        Specify the field argument as  a  character  string  expression  that
  89.        evaluates to one of the following strings:
  90.  
  91.        DATE       The date field is returned.
  92.  
  93.        DATETIME   The entire date and time string is returned.
  94.  
  95.        DAY        The day field is returned.
  96.  
  97.        HOUR       The hour field is returned.
  98.  
  99.        HUNDREDTH  The hundredth of a second field is returned.
  100.  
  101.        MINUTE     The minute field is returned.
  102.  
  103.  
  104.  
  105.        MONTH      The month field is returned.  You cannot specify MONTH  if
  106.                   you  also specify  a delta input time and the DELTA output
  107.                   time argument.
  108.  
  109.        SECOND     The second field is returned.
  110.  
  111.        TIME       The time field is returned.
  112.  
  113.        WEEKDAY    The weekday that corresponds with the input time  argument
  114.                   is  returned.   You  cannot  specify  WEEKDAY if  you also
  115.                   specify  a delta input time  and  the  DELTA  output  time
  116.                   argument.  When the  weekday is returned, the first letter
  117.                   is  in  uppercase,   and  the  following  letters  are  in
  118.                   lowercase.
  119.  
  120.        YEAR       The year field is returned.  You cannot  specify  YEAR  if
  121.                   you  also specify  a delta input time and the DELTA output
  122.                   time argument.
  123.  
  124.        If you do not specify a field  argument,  the  default  is  DATETIME.
  125.  
  126. F$CVTIME.Examples
  127.  
  128.  F$CVTIME
  129.  
  130.     Examples
  131.  
  132.  
  133.        1.   $ TIME = F$TIME()
  134.             $ SHOW SYMBOL TIME
  135.               TIME = "15-APR-1989 10:56:23.10"
  136.             $ TIME = F$CVTIME(TIME)
  137.             $ SHOW SYMBOL TIME
  138.               TIME = "1989-04-15 10:56:23.10"
  139.  
  140.        This example uses the F$TIME function to return the system time as  a
  141.        character  string,  and  to assign the time to the symbol TIME.  Then
  142.        the F$CVTIME function is used  to  convert  the  system  time  to  an
  143.        alternate  time format.  Note that you do not need to place quotation
  144.        marks around the argument TIME because it is a symbol.   Symbols  are
  145.        automatically  evaluated  when they are used as arguments for lexical
  146.        functions.
  147.  
  148.  
  149.  
  150.        You can use the resultant string to compare two  dates  (using  .LTS.
  151.        and  .GTS.  operators).  For example, you can use F$CVTIME to convert
  152.        two time strings and store the results  in  the  symbols  TIME_1  and
  153.        TIME_2.  You can compare the two values, and branch to a label, based
  154.        on the results as shown below:
  155.  
  156.             $ IF TIME_1 .LTS. TIME_2 THEN GOTO FIRST
  157.  
  158.        2.  $ NEXT = F$CVTIME("TOMORROW",,"WEEKDAY")
  159.            $ SHOW SYMBOL NEXT
  160.              NEXT = "Tuesday"
  161.  
  162.        In this example, the F$CVTIME returns the weekday that corresponds to
  163.        the absolute time keyword "TOMORROW".  You must enclose the arguments
  164.        "TOMORROW"  and  "WEEKDAY"  in  quotation  marks  because  they   are
  165.        character  string  expressions.   Also, you must include a comma as a
  166.        placeholder for the output time argument that is omitted.
  167.  
  168. F$DIRECTORY
  169.  
  170.   F$DIRECTORY
  171.  
  172.  
  173.      Returns the current default directory name string.   The  F$DIRECTORY
  174.      function has no arguments but must be followed by parentheses.
  175.  
  176.      Format:
  177.  
  178.           F$DIRECTORY()
  179.  
  180.  
  181.      Additional information available:
  182.  
  183.       Return_Value F$DIRECTORY.Return_Value   Example F$DIRECTORY.Example 
  184.  
  185. F$DIRECTORY.Return_Value
  186.  
  187.  F$DIRECTORY
  188.  
  189.     Return_Value
  190.  
  191.        A character string for the current default directory name,  including
  192.        square brackets ([]).  If you use the SET DEFAULT command and specify
  193.        angle brackets (<>) in a  directory  specification,  the  F$DIRECTORY
  194.        function returns angle brackets in the directory string.
  195.  
  196.  
  197. F$DIRECTORY.Example
  198.  
  199.  F$DIRECTORY
  200.  
  201.     example
  202.  
  203.        1.   $ SAVE_DIR = F$DIRECTORY()
  204.             $ SET DEFAULT [MALCOLM.TESTFILES]
  205.                .
  206.                .
  207.                .
  208.             $ SET DEFAULT 'SAVE_DIR'
  209.  
  210.        This example shows an excerpt from a command procedure that uses  the
  211.        F$DIRECTORY  function  to save the current default directory setting.
  212.        The assignment statement equates the symbol SAVE_DIR to  the  current
  213.        directory.   Then  the  SET DEFAULT command establishes a new default
  214.        directory.  Later, the symbol SAVE_DIR is used  in  the  SET  DEFAULT
  215.        command that restores the original default directory.
  216.  
  217. F$EDIT
  218.  
  219.   F$EDIT
  220.  
  221.      Edits a string  expression  based  on  the  edits  specified  in  the
  222.      edit-list.
  223.  
  224.      Format:
  225.  
  226.           F$EDIT(string, edit-keyword)
  227.  
  228.  
  229.      Additional information available:
  230.  
  231.       Return_Value F$EDIT.Return_Value   String F$EDIT.Return_Value         Edit_keyword F$EDIT.Edit_keyword 
  232.       Examples F$EDIT.Examples 
  233.  
  234. F$EDIT.Return_Value
  235.  
  236.  F$EDIT
  237.  
  238.     Return_Value
  239.  
  240.        A character string containing the specified edits.
  241.  
  242.  
  243.  F$EDIT
  244.  
  245.     string
  246.  
  247.        A string to be edited.  Specify the string argument as a character
  248.        string expression.
  249.  
  250. F$EDIT.Edit_keyword
  251.  
  252.  F$EDIT
  253.  
  254.     edit_keyword
  255.  
  256.        A keyword that specify the types of edits to be made to the string.
  257.        You cannot abbreviate these keywords.
  258.  
  259.        Specify the edit_keyword argument as a character string expression.
  260.  
  261.